<template>
  <div class="orders">
    <div class="order">我的订单</div>
    <van-grid square class="grid">
      <van-grid-item v-for="(item, i) in orders" :key="i">
        <template #icon>
          <van-image class="img" :src="require(`@/assets/imgs/${item.icon}`)" />
        </template>
        <template #text>
          <span class="title">{{ item.title }}</span>
        </template>
      </van-grid-item>
    </van-grid>
  </div>
</template>

<script>
export default {
  data() {
    return {
      orders: [
        { title: "待付款", icon: "4.png" },
        { title: "待发货", icon: "5.png" },
        { title: "待收货", icon: "6.png" },
        { title: "已完成", icon: "7.png" },
      ],
    };
  },
};
</script>

<style lang="scss" scoped>
.order {
  font-size: 30px;
  color: #999999;
  background: #fff;
  height: 40px;
  padding: 20px;
}
.grid {
  width: 100%;
  height: 100px;
  background: #ffffff;
  border-radius: 10px;
  margin: auto;

  .img {
    width: 82px;
    height: 82px;
  }

  .title {
    font-size: 24px;
    color: #999999;
  }
}
</style>
